/* 全局响应式样式 */

/* 基础响应式设置 */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

/* 移动端字体调整 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  /* Ant Design 组件移动端优化 */
  .ant-table-thead > tr > th {
    padding: 8px 4px !important;
    font-size: 12px !important;
  }
  
  .ant-table-tbody > tr > td {
    padding: 8px 4px !important;
    font-size: 12px !important;
  }
  
  .ant-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: auto !important;
    min-height: 28px;
  }
  
  .ant-input {
    padding: 6px 8px !important;
    font-size: 14px !important;
  }
  
  .ant-select {
    font-size: 14px !important;
  }
  
  .ant-select-selector {
    padding: 6px 8px !important;
  }
  
  .ant-card-body {
    padding: 12px !important;
  }
  
  .ant-modal-content {
    margin: 0 !important;
  }
  
  .ant-modal-header {
    padding: 12px 16px !important;
  }
  
  .ant-modal-body {
    padding: 16px !important;
  }
  
  .ant-form-item {
    margin-bottom: 16px !important;
  }
  
  .ant-pagination {
    text-align: center !important;
  }
  
  .ant-pagination-item {
    min-width: 28px !important;
    height: 28px !important;
    line-height: 26px !important;
    font-size: 12px !important;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  html {
    font-size: 12px;
  }
  
  .ant-table-thead > tr > th {
    padding: 6px 2px !important;
    font-size: 11px !important;
  }
  
  .ant-table-tbody > tr > td {
    padding: 6px 2px !important;
    font-size: 11px !important;
  }
  
  .ant-btn {
    padding: 2px 6px !important;
    font-size: 11px !important;
    min-height: 24px;
  }
  
  .ant-input {
    padding: 4px 6px !important;
    font-size: 12px !important;
  }
  
  .ant-card-body {
    padding: 8px !important;
  }
  
  .ant-modal-header {
    padding: 8px 12px !important;
  }
  
  .ant-modal-body {
    padding: 12px !important;
  }
  
  .ant-form-item {
    margin-bottom: 12px !important;
  }
  
  .ant-pagination-item {
    min-width: 24px !important;
    height: 24px !important;
    line-height: 22px !important;
    font-size: 11px !important;
  }
}

/* 表格响应式优化 */
@media (max-width: 768px) {
  .ant-table-wrapper {
    overflow-x: auto;
  }
  
  .ant-table {
    min-width: 600px;
  }
  
  .ant-table-fixed-right {
    right: 0 !important;
  }
}

/* 布局响应式 */
@media (max-width: 768px) {
  .ant-layout-sider {
    position: fixed !important;
    height: 100vh !important;
    z-index: 1001 !important;
  }
  
  .ant-layout-content {
    margin-left: 0 !important;
  }
  
  .ant-layout-header {
    padding: 0 12px !important;
  }
}

/* 卡片网格响应式 */
@media (max-width: 576px) {
  .ant-col {
    padding: 4px !important;
  }
}

/* 表单响应式 */
@media (max-width: 768px) {
  .ant-form-item-label {
    text-align: left !important;
  }
  
  .ant-form-item-label > label {
    font-size: 13px !important;
  }
}

/* 分页响应式 */
@media (max-width: 480px) {
  .ant-pagination-options {
    display: none !important;
  }
  
  .ant-pagination-jump-prev,
  .ant-pagination-jump-next {
    display: none !important;
  }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
  .ant-btn,
  .ant-card,
  .ant-table-row {
    cursor: default;
  }
  
  .ant-btn:hover,
  .ant-card:hover {
    transform: none !important;
  }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .ant-modal {
    top: 10px !important;
  }
  
  .ant-modal-content {
    max-height: calc(100vh - 20px) !important;
    overflow-y: auto;
  }
}